package com.mbigger.spi;

import java.util.Iterator;
import java.util.ServiceLoader;

public class MainClass {

    public static void main(String[] args) {
        ServiceLoader<Log> logs = ServiceLoader.load(Log.class);
        Iterator<Log> logIterator = logs.iterator();
        while (logIterator.hasNext()) {
            Log log = logIterator.next();
            System.err.println(log.getClass().getName());
            log.info("测试");
        }
    }

}
